#pragma once

#include "RectBase.h"


class RectElement;


class RectAni : public RectBase
{
public:
	RectAni();
	virtual ~RectAni();

	virtual void	Update();
	virtual void	ChangeSize();

	void			Create(int nPosX, int nPosY, int nWidth, int nHeight);
	void			AddRectElement(RectElement* pRectElement);
	void			ClearRectElement();
	int				GetRectElementCount()		{ return int(m_listRectElement.size()); }
	void			SetTexture(int nIndex, const char* pPath);
	void			PlayAni(int nAniMargin);

	BOOL			IsPlaying()					{ return m_bIsPlay; }

private:
	std::vector<RectElement* >	m_listRectElement;
	RectElement*				m_pCurElement;

	int							m_nCurAniIndex;
	int							m_nAniMargin;
	int							m_nAniTick;
	BOOL						m_bIsPlay;
};